package com.project_doctor.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.project_doctor.pojo.Contract;
import com.project_doctor.pojo.dto.*;
import com.baomidou.mybatisplus.extension.service.IService;
import com.project_doctor.pojo.vo.ContractDetailVO;
import com.project_doctor.pojo.vo.ContractVO;
import com.project_doctor.pojo.vo.DetailsVO;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
* @author xixif
* @description 针对表【t_contract(签约服务记录表)】的数据库操作Service
* @createDate 2025-06-10 18:51:42
*/
public interface ContractService extends IService<Contract> {

    /**
     * 根据居民ID获取签约信息列表
     * @param residentId 居民ID
     * @return 签约信息列表
     */
    List<ContractInfoDTO> getContractInfoByResidentId(Integer residentId);

    Page<ContractVO> getAllContract(Integer pageNum, Integer pageSize, ContractQueryDTO queryDTO);


    List<ContractDetailVO> getAllContractDetail(Integer id);


    void saveContract(ContractDTO contractDTO);

    void approveContract(ContractApproveDTO approveDTO);

    void rejectContract(ContractRejectDTO rejectDTO);


    Page<ContractVO> getContractVoList(ContractQueryDTO queryDTO, Integer pageNum, Integer pageSize);

    DetailsVO selectContractDetail(Integer contractId);

    void updateService(DetailsDTO dto);

    void addService(DetailsDTO dto);

    void updateApproved(Integer contractId,String  userName);

    void updateComplete(Integer contractId);

    void updateCancel(CancelDTO dto);

    void updateReject(RejectDTO dto);
}
